package com.fingard.avatar.website.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.fingard.avatar.website.model.bean.PageView;
import com.fingard.avatar.website.model.dto.ExperienceApplyPageDto;
import com.fingard.avatar.website.model.po.ExperienceApplyPo;
import com.fingard.avatar.website.service.ExperienceApplyService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 徐一涛
 * @date 2022/5/12
 */
@Slf4j
@RestController
@RequestMapping("api/experienceApply")
@Api(tags = "")
public class ExperienceApplyController {

    @Resource
    protected ExperienceApplyService applyService;

    @PostMapping("page")
    public PageView<ExperienceApplyPo> experienceApply(@Validated ExperienceApplyPageDto req) {
        IPage<ExperienceApplyPo> iPage = applyService.page(req);
        return PageView.success(iPage);
    }

}
